import { createWebHashHistory, createRouter } from "vue-router";

import HomeView from "../views/home/index.vue";
import AboutView from "../views/about/index.vue";

const routes = [
  {
    path: "/lyy",
    component: () => import("../views/lyy/index.vue"),
    name: "lyy",
    children: [
      {
        path: "/lyy",
        component: () => import("../views/lyy/child.vue"),
      },
    ],
  },
  { path: "/", component: HomeView, name: "home" },
  { path: "/about", component: AboutView, name: "about" },
  {
    path: "/zzm",
    redirect: { name: "zzmFuzi" },
    name: "zzm",
    children: [
      {
        path: "/fuzi/fu",
        component: () => import("../views/zzm/fuzichuanzhi/fu.vue"),
        name: "zzmFuzi",
      },
      {
        path: "/zifu/index",
        component: () => import("../views/zzm/zifuchuanzhi/index.vue"),
        name: "zzmZifu",
      },
      {
        path: "/chacao/index",
        component: () => import("../views/zzm/chacao/index.vue"),
        name: "zzmChaCao",
      },
      {
        path: "/example/index2",
        component: () => import("../views/zzm/example/buttonTest.vue"),
        name: "buttonTest2",
      },
      {
        path: "/table/test2",
        component: () => import("../views/zzm/table/test.vue"),
        name: "TableTest2",
      },
    ],
  },
  {
    path: "/ltx",

    name: "ltx",
    children: [
      {
        path: "/fuzi/fu",
        component: () => import("../views/ltx/fuzichuanzhi/fu.vue"),
        name: "ltxFuzi",
      },
    ],
  },

  {
    path: "/tkk",
    component: () => import("../views/tkk/index.vue"),
    name: "tkk",
  },
  {
    path: "/dan",
    component: () => import("../views/dan/index.vue"),
    name: "dan",
    children: [
      {
        path: "/dan1",
        component: () => import("../views/dan/dan1/index.vue"),
        name: "dan1",
      },
      {
        path: "/fuchuanzi",
        component: () => import("../views/dan/funchuanzi/fu.vue"),
        name: "fuchuanzi",
      },
      {
        path: "/zichuanfu",
        component: () => import("../views/dan/zichuanfu/fu.vue"),
        name: "zichuanfu",
      },
    ],
  },
  {
    path: "/wyr",
    component: () => import("../views/wyr/index.vue"),
    name: "wyr",
  },
  {
    path: "/cuiying",
    component: () => import("../views/cuiying/index.vue"),
    name: "cuiying",
    children: [
      {
        path: "/cuiying/two",
        component: () => import("../views/cuiying/two/index.vue"),
        name: "two",
      },
      {
        path: "/cuiying/zifuchuanzi",
        component: () => import("../views/cuiying/zifuchuanzi/index.vue"),
        name: "zifuchuanzi",
      },
      {
        path: "/cuiying/chacao",
        component: () => import("../views/cuiying/chacao/index.vue"),
        name: "chacao",
      },
      {
        path: "/cuiying/example",
        component: () => import("../views/cuiying/example/buttonTest.vue"),
        name: "buttonTest",
      },
    ],
  },
  {
    path: "/zcc",
    component: () => import("../views/zcc/index.vue"),
    name: "zcc",
    children: [
      {
        path: "/zcc",
        component: () => import("../views/zcc/home/fu.vue"),
        name: "home",
      },
    ],
  },
  {
    path: "/zmb",
    component: () => import("../views/zmb/index.vue"),
    name: "zmb",
    children: [
      {
        path: "/zmb",
        component: () => import("../views/zmb/dy/index.vue"),
      },
    ],
  },
  {
    path: "/whj",
    redirect: { name: "whjFuzi" },
    name: "whj",
    children: [
      {
        path: "/fuzi/fu",
        component: () => import("../views/whj/fuzichuanzhi/fu.vue"),
        name: "whjFuzi",
      },
      {
        path: "/zifu/index",
        component: () => import("../views/whj/zifuchuanzhi/zi.vue"),
        name: "whjZifu",
      },
      {
        path: "/chacao/index",
        component: () => import("../views/whj/chaocao/index.vue"),
        name: "whjChaCao",
      },
      {
        path: "/example/index",
        component: () => import("../views/whj/example/buttonTest.vue"),
        name: "buttonTest",
      },
      {
        path: "/table/test1",
        component: () => import("../views/whj/table/test.vue"),
        name: "TableTest",
      },
    ],
  },
  {
    path: "/Yangjunyi",
    component: () => import("../views/Yangjunyi/index.vue"),
    name: "Yangjunyi",
    children: [
      {
        path: "/yjy",
        component: () => import("../views/Yangjunyi/yjy/index.vue"),
        name: "yjy",
      },
      {
        path: "/yjy/index",
        component: () => import("../views/Yangjunyi/zifuchuanzhi/fu.vue"),
        name: "yjyfu",
      },
      {
        path: "/yjy/chaocao",
        component: () => import("../views/Yangjunyi/chaocao/index.vue"),
        name: "yjychacao",
      },
      {
        path: "/yjy/example",
        component: () => import("../views/Yangjunyi/example/buttonTest.vue"),
        name: "yjyexample",
      },
      {
        path: "/ytable/test",
        component: () => import("../views/Yangjunyi/table/test.vue"),
        name: "YTableTest",
      },
    ],
  },
  {
    path: "/lyd",
    component: () => import("../views/lyd/index copy.vue"),
    name: "lyd",
  },
  {
    path: "/zch",
    component: () => import("../views/zch/index.vue"),
    name: "zch",
  },
  {
    path: "/mhy",
    component: () => import("../views/mhy/index.vue"),
    name: "mhy",
    children: [
      {
        path: "/menghuiyu",
        name: "menghuiyu",
        component: () => import("../views/mhy/menghuiyu/index.vue"),
      },
      {
        path: "/zifu/index",
        name: "mhyZifu",
        component: () => import("../views/mhy/zufuchuanzhi/fu.vue"),
      },
      {
        path: "/chacao/index",
        name: "mhyChacao",
        component: () => import("../views/mhy/chacao/index.vue"),
      },
      {
        path: "/example/index",
        name: "mhyExample",
        component: () => import("../views/mhy/example/buttonTest.vue"),
      },
      {
        path: "/yemian/index",
        name: "mhyYemian",
        component: () => import("../views/mhy/yemian/Mhyindex.vue"),
      },
      {
        path: "/mhyTable/index",
        name: "mhyTable",
        component: () => import("../views/mhy/table/index.vue"),
      },
    ],
  },
  {
    path: "/:pathMatch(.*)*",
    name: "NotFound",
    component: () => import("../views/404.vue"),
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
